home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / FAQSYS18.ZIP / FAQS.DAT / AUDIO.309 / text0001.txt < prev   
Encoding:
Text File  |  1995-12-12  |  59.3 KB  |  1,523 lines

  1. Archive-name: audio-fmts/part2
  2. Submitted-by: Guido van Rossum <guido@cwi.nl>
  3. Version: 3.09
  4. Last-modified: 1-Aug-1994
  5.  
  6. Appendices
  7. ==========
  8.  
  9. Here are some more detailed pieces of info that I received by e-mail.
  10. They are reproduced here virtually without much editing.
  11.  
  12. Table of contents
  13. -----------------
  14.  
  15. FTP access for non-internet sites
  16. AIFF Format (Audio IFF)
  17. The NeXT/Sun audio file format
  18. IFF/8SVX Format
  19. Playing sound on a PC
  20. The EA-IFF-85 documentation
  21. US Federal Standard 1016 availability
  22. Creative Voice (VOC) file format
  23. RIFF WAVE (.WAV) file format
  24. U-LAW and A-LAW definitions
  25. AVR File Format
  26. The Amiga MOD Format
  27. The Sample Vision Format
  28. Some Miscellaneous Formats
  29. Tandy Deskmate .snd Format Notes
  30.  
  31.  
  32. ------------------------------------------------------------------------
  33. FTP access for non-internet sites
  34. ---------------------------------
  35.  
  36. >From the sci.space FAQ:
  37.  
  38.     Sites not connected to the Internet cannot use FTP directly, but
  39.     there are a few automated FTP servers which operate via email.
  40.     Send mail containing only the word HELP to ftpmail@decwrl.dec.com
  41.     or bitftp@pucc.princeton.edu, and the servers will send you
  42.     instructions on how to make requests.  (The bitftp service is no
  43.     longer available through UUCP gateways due to complaints about
  44.     overuse :-( )
  45.  
  46. Also:
  47.  
  48.     FAQ lists are available by anonymous FTP from rftm.mit.edu
  49.     and by email from mail-server@rtfm.mit.edu (send a message
  50.     containing "help" for instructions about the mail server).
  51.  
  52.  
  53. ------------------------------------------------------------------------
  54. AIFF Format (Audio IFF) and AIFC
  55. --------------------------------
  56.  
  57. This format was developed by Apple for storing high-quality sampled
  58. sound and musical instrument info; it is also used by SGI and several
  59. professional audio packages (sorry, I know no names).  An extension,
  60. called AIFC or AIFF-C, supports compression (see the last item below).
  61.  
  62. I've made a BinHex'ed MacWrite version of the AIFF spec (no idea if
  63. it's the same text as mentioned below) available by anonymous ftp from
  64. ftp.cwi.nl; the file is /pub/audio/AudioIFF1.2.hqx.  A newer version
  65. is also available: /pub/audio/AudioIFF1.3.hqx.  But you may be better
  66. off with the AIFF-C specs, see below.
  67.  
  68. Mike Brindley (brindley@ece.orst.edu) writes:
  69.  
  70. "The complete AIFF spec by Steve Milne, Matt Deatherage (Apple) is
  71. available in 'AMIGA ROM Kernal Reference Manual: Devices (3rd Edition)'
  72. 1991 by Commodore-Amiga, Inc.; Addison-Wesley Publishing Co.; 
  73. ISBN 0-201-56775-X, starting on page 435 (this edition has a charcoal
  74. grey cover).  It is available in most bookstores, and soon in many
  75. good librairies."
  76.  
  77. According to Mark Callow (msc@sgi.com):
  78.  
  79. A PostScript version of the AIFF-C specification is available via
  80. anonymous ftp on ftp.sgi.com as /sgi/aiff-c.9.26.91.ps.
  81.  
  82. Benjamin Denckla <bdenckla@husc.harvard.edu> writes:
  83.  
  84. A piece of information that may be of some use to people who want to use
  85. AIFF files with their Macintosh Think C programs:  AIFF data structures are
  86. contained in the file AIFF.h in the "Apple #Includes" folder that comes
  87. on the distribution disks.  I assume that this header file comes with 
  88. Apple programming products like MPW [C|C++] as well.  I found this out a 
  89. little too late: I had already coded my own structures.  These structures 
  90. of mine, along with other useful code for AIFF-based DSP in C, are 
  91. available for ftp at ftp.cs.jhu.edu in pub/dsp.
  92.  
  93. An important file format for the Mac which is only mentioned once in the
  94. FAQ is the Sound Designer II file format.  There is also an older Sound
  95. Designer I format.  I have the SDII format in electronic form but I don't
  96. think I'm at liberty to distribute it.  It can be obtained by applying to
  97. become a 3rd Party Developer for Digidesign.  This process is simple
  98. (1-page application) and free.  Call Digidesign at 415-688-0600 for
  99. information.  The SDII file format is interesting in that all non-sample
  100. data (sample rate, channels, etc.) is contained in the resource fork and
  101. the data fork contains sample data only.
  102.  
  103. ------------------------------------------------------------------------
  104. The NeXT/Sun audio file format
  105. ------------------------------
  106.  
  107. Here's the complete story on the file format, from the NeXT
  108. documentation.  (Note that the "magic" number is ((int)0x2e736e64),
  109. which equals ".snd".)  Also, at the end, I've added a litte document
  110. that someone posted to the net a couple of years ago, that describes
  111. the format in a bit-by-bit fashion rather than from C.
  112.  
  113. I received this from Doug Keislar, NeXT Computer.  This is also the
  114. Sun format, except that Sun doesn't recognize as many format codes.  I
  115. added the numeric codes to the table of formats and sorted it.
  116.  
  117.  
  118. SNDSoundStruct:  How a NeXT Computer Represents Sound
  119.  
  120. The NeXT sound software defines the SNDSoundStruct structure to  
  121. represent sound.  This structure defines the soundfile and Mach-O  
  122. sound segment formats and the sound pasteboard type.  It's also used  
  123. to describe sounds in Interface Builder.  In addition, each instance  
  124. of the Sound Kit's Sound class encapsulates a SNDSoundStruct and  
  125. provides methods to access and modify its attributes.
  126.  
  127. Basic sound operations, such as playing, recording, and cut-and-paste  
  128. editing, are most easily performed by a Sound object.  In many cases,  
  129. the Sound Kit obviates the need for in-depth understanding of the  
  130. SNDSoundStruct architecture.  For example, if you simply want to  
  131. incorporate sound effects into an application, or to provide a simple  
  132. graphic sound editor (such as the one in the Mail application), you  
  133. needn't be aware of the details of the SNDSoundStruct.  However, if  
  134. you want to closely examine or manipulate sound data you should be  
  135. familiar with this structure.
  136.  
  137. The SNDSoundStruct contains a header, information that describes the  
  138. attributes of a sound, followed by the data (usually samples) that  
  139. represents the sound.  The structure is defined (in  
  140. sound/soundstruct.h) as:
  141.  
  142. typedef struct {
  143.     int magic;               /* magic number SND_MAGIC */
  144.     int dataLocation;        /* offset or pointer to the data */
  145.     int dataSize;            /* number of bytes of data */
  146.     int dataFormat;          /* the data format code */
  147.     int samplingRate;        /* the sampling rate */
  148.     int channelCount;        /* the number of channels */
  149.     char info[4];            /* optional text information */
  150. } SNDSoundStruct;
  151.  
  152.  
  153.  
  154.  
  155. SNDSoundStruct Fields
  156.  
  157.  
  158.  
  159. magic
  160.  
  161. magic is a magic number that's used to identify the structure as a  
  162. SNDSoundStruct.  Keep in mind that the structure also defines the  
  163. soundfile and Mach-O sound segment formats, so the magic number is  
  164. also used to identify these entities as containing a sound.
  165.  
  166.  
  167.  
  168.  
  169.  
  170. dataLocation
  171.  
  172. It was mentioned above that the SNDSoundStruct contains a header  
  173. followed by sound data.  In reality, the structure only contains the  
  174. header; the data itself is external to, although usually contiguous  
  175. with, the structure.  (Nonetheless, it's often useful to speak of the  
  176. SNDSoundStruct as the header and the data.)  dataLocation is used to  
  177. point to the data.  Usually, this value is an offset (in bytes) from  
  178. the beginning of the SNDSoundStruct to the first byte of sound data.   
  179. The data, in this case, immediately follows the structure, so  
  180. dataLocation can also be thought of as the size of the structure's  
  181. header.  The other use of dataLocation, as an address that locates  
  182. data that isn't contiguous with the structure, is described in  
  183. "Format Codes," below.
  184.  
  185.  
  186.  
  187.  
  188.  
  189. dataSize, dataFormat, samplingRate, and channelCount
  190.  
  191. These fields describe the sound data.
  192.  
  193. dataSize is its size in bytes (not including the size of the  
  194. SNDSoundStruct).
  195.  
  196. dataFormat is a code that identifies the type of sound.  For sampled  
  197. sounds, this is the quantization format.  However, the data can also  
  198. be instructions for synthesizing a sound on the DSP.  The codes are  
  199. listed and explained in "Format Codes," below.
  200.  
  201. samplingRate is the sampling rate (if the data is samples).  Three  
  202. sampling rates, represented as integer constants, are supported by  
  203. the hardware:
  204.  
  205. Constant        Sampling Rate (samples/sec) 
  206.  
  207. SND_RATE_CODEC  8012.821        (CODEC input)
  208. SND_RATE_LOW    22050.0 (low sampling rate output)
  209. SND_RATE_HIGH   44100.0 (high sampling rate output)
  210.  
  211. channelCount is the number of channels of sampled sound.
  212.  
  213.  
  214.  
  215.  
  216.  
  217. info
  218.  
  219. info is a NULL-terminated string that you can supply to provide a  
  220. textual description of the sound.  The size of the info field is set  
  221. when the structure is created and thereafter can't be enlarged.  It's  
  222. at least four bytes long (even if it's unused).
  223.  
  224.  
  225.  
  226.  
  227.  
  228. Format Codes
  229.  
  230. A sound's format is represented as a positive 32-bit integer.  NeXT  
  231. reserves the integers 0 through 255; you can define your own format  
  232. and represent it with an integer greater than 255.  Most of the  
  233. formats defined by NeXT describe the amplitude quantization of  
  234. sampled sound data:
  235.  
  236. Value   Code    Format 
  237.  
  238. 0       SND_FORMAT_UNSPECIFIED  unspecified format 
  239. 1       SND_FORMAT_MULAW_8      8-bit mu-law samples
  240. 2       SND_FORMAT_LINEAR_8     8-bit linear samples
  241. 3       SND_FORMAT_LINEAR_16    16-bit linear samples
  242. 4       SND_FORMAT_LINEAR_24    24-bit linear samples
  243. 5       SND_FORMAT_LINEAR_32    32-bit linear samples
  244. 6       SND_FORMAT_FLOAT        floating-point samples
  245. 7       SND_FORMAT_DOUBLE       double-precision float samples
  246. 8       SND_FORMAT_INDIRECT     fragmented sampled data
  247. 9       SND_FORMAT_NESTED       ?
  248. 10      SND_FORMAT_DSP_CORE     DSP program
  249. 11      SND_FORMAT_DSP_DATA_8   8-bit fixed-point samples
  250. 12      SND_FORMAT_DSP_DATA_16  16-bit fixed-point samples
  251. 13      SND_FORMAT_DSP_DATA_24  24-bit fixed-point samples
  252. 14      SND_FORMAT_DSP_DATA_32  32-bit fixed-point samples
  253. 15      ?
  254. 16      SND_FORMAT_DISPLAY      non-audio display data
  255. 17      SND_FORMAT_MULAW_SQUELCH        ?
  256. 18      SND_FORMAT_EMPHASIZED   16-bit linear with emphasis
  257. 19      SND_FORMAT_COMPRESSED   16-bit linear with compression
  258. 20      SND_FORMAT_COMPRESSED_EMPHASIZED        A combination of the two above
  259. 21      SND_FORMAT_DSP_COMMANDS Music Kit DSP commands
  260. 22      SND_FORMAT_DSP_COMMANDS_SAMPLES         ?
  261. [Some new ones supported by Sun.  This is all I currently know. --GvR]
  262. 23      SND_FORMAT_ADPCM_G721
  263. 24      SND_FORMAT_ADPCM_G722
  264. 25      SND_FORMAT_ADPCM_G723_3
  265. 26      SND_FORMAT_ADPCM_G723_5
  266. 27      SND_FORMAT_ALAW_8
  267.  
  268.  
  269. Most formats identify different sizes and types of  
  270. sampled data.  Some deserve special note:  
  271.  
  272.  
  273. --      SND_FORMAT_DSP_CORE format contains data that represents a  
  274. loadable DSP core program.  Sounds in this format are required by the  
  275. SNDBootDSP() and SNDRunDSP() functions.  You create a  
  276. SND_FORMAT_DSP_CORE sound by reading a DSP load file (extension  
  277. ".lod") with the SNDReadDSPfile() function.
  278.  
  279. --      SND_FORMAT_DSP_COMMANDS is used to distinguish sounds that  
  280. contain DSP commands created by the Music Kit.  Sounds in this format  
  281. can only be created through the Music Kit's Orchestra class, but can  
  282. be played back through the SNDStartPlaying() function.
  283.  
  284. --      SND_FORMAT_DISPLAY format is used by the Sound Kit's  
  285. SoundView class.  Such sounds can't be played.  
  286.  
  287.  
  288. --      SND_FORMAT_INDIRECT indicates data that has become  
  289. fragmented, as described in a separate section, below.  
  290.  
  291.  
  292. --      SND_FORMAT_UNSPECIFIED is used for unrecognized formats.
  293.  
  294.  
  295.  
  296.  
  297.  
  298. Fragmented Sound Data
  299.  
  300. Sound data is usually stored in a contiguous block of memory.   
  301. However, when sampled sound data is edited (such that a portion of  
  302. the sound is deleted or a portion inserted), the data may become  
  303. discontiguous, or fragmented.  Each fragment of data is given its own  
  304. SNDSoundStruct header; thus, each fragment becomes a separate  
  305. SNDSoundStruct structure.  The addresses of these new structures are  
  306. collected into a contiguous, NULL-terminated block; the dataLocation  
  307. field of the original SNDSoundStruct is set to the address of this  
  308. block, while the original format, sampling rate, and channel count  
  309. are copied into the new SNDSoundStructs.  
  310.  
  311.  
  312. Fragmentation serves one purpose:  It avoids the high cost of moving  
  313. data when the sound is edited.  Playback of a fragmented sound is  
  314. transparent-you never need to know whether the sound is fragmented  
  315. before playing it.  However, playback of a heavily fragmented sound  
  316. is less efficient than that of a contiguous sound.  The  
  317. SNDCompactSamples() C function can be used to compact fragmented  
  318. sound data.
  319.  
  320. Sampled sound data is naturally unfragmented.  A sound that's freshly  
  321. recorded or retrieved from a soundfile, the Mach-O segment, or the  
  322. pasteboard won't be fragmented.  Keep in mind that only sampled data  
  323. can become fragmented.
  324.  
  325.  
  326.  
  327. _________________________
  328. >From mentor.cc.purdue.edu!purdue!decwrl!ucbvax!ziploc!eps Wed Apr  4  
  329. 23:56:23 EST 1990
  330. Article 5779 of comp.sys.next:
  331. Path: mentor.cc.purdue.edu!purdue!decwrl!ucbvax!ziploc!eps
  332. >From: eps@toaster.SFSU.EDU (Eric P. Scott)
  333. Newsgroups: comp.sys.next
  334. Subject: Re: Format of NeXT sndfile headers?
  335. Message-ID: <445@toaster.SFSU.EDU>
  336. Date: 31 Mar 90 21:36:17 GMT
  337. References: <14978@phoenix.Princeton.EDU>
  338. Reply-To: eps@cs.SFSU.EDU (Eric P. Scott)
  339. Organization: San Francisco State University
  340. Lines: 42
  341.  
  342. In article <14978@phoenix.Princeton.EDU>
  343.         bskendig@phoenix.Princeton.EDU (Brian Kendig) writes:
  344. >I'd like to take a program I have that converts Macintosh sound  
  345. files
  346. >to NeXT sndfiles and polish it up a bit to go the other direction as
  347. >well.
  348.  
  349. Two people have already submitted programs that do this
  350. (Christopher Lane and Robert Hood); check the various
  351. NeXT archive sites.
  352.  
  353. >       Could someone please give me the format of a NeXT sndfile
  354. >header?
  355.  
  356. "big-endian"
  357.         0       1       2       3
  358.         +-------+-------+-------+-------+
  359. 0       | 0x2e  | 0x73  | 0x6e  | 0x64  |       "magic" number
  360.         +-------+-------+-------+-------+
  361. 4       |                               |       data location
  362.         +-------+-------+-------+-------+
  363. 8       |                               |       data size
  364.         +-------+-------+-------+-------+
  365. 12      |                               |       data format (enum)
  366.         +-------+-------+-------+-------+
  367. 16      |                               |       sampling rate (int)
  368.         +-------+-------+-------+-------+
  369. 20      |                               |       channel count
  370.         +-------+-------+-------+-------+
  371. 24      |       |       |       |       |       (optional) info  
  372. string
  373.  
  374. 28 = minimum value for data location
  375.  
  376. data format values can be found in /usr/include/sound/soundstruct.h
  377.  
  378. Most common combinations:
  379.  
  380.          sampling  channel    data
  381.              rate    count  format              
  382. voice file   8012        1       1 =  8-bit mu-law
  383. system beep 22050        2       3 = 16-bit linear
  384. CD-quality  44100        2       3 = 16-bit linear
  385.  
  386. ------------------------------------------------------------------------
  387. IFF/8SVX Format
  388. ---------------
  389.  
  390. Newsgroups: alt.binaries.sounds.d,alt.sex.sounds
  391. Subject: Format of the IFF header (Amiga sounds)
  392. Message-ID: <2509@tardis.Tymnet.COM>
  393. From: jms@tardis.Tymnet.COM (Joe Smith)
  394. Date: 23 Oct 91 23:54:38 GMT
  395. Followup-To: alt.binaries.sounds.d
  396. Organization: BT North America (Tymnet)
  397.  
  398. The first 12 bytes of an IFF file are used to distinguish between an Amiga
  399. picture (FORM-ILBM), an Amiga sound sample (FORM-8SVX), or other file
  400. conforming to the IFF specification.  The middle 4 bytes is the count of
  401. bytes that follow the "FORM" and byte count longwords.  (Numbers are stored
  402. in M68000 form, high order byte first.)
  403.  
  404.                 ------------------------------------------
  405.  
  406. FutureSound audio file, 15000 samples at 10.000KHz, file is 15048 bytes long.
  407.  
  408. 0000: 464F524D 00003AC0 38535658 56484452    FORM..:.8SVXVHDR
  409.       F O R M     15040 8 S V X  V H D R
  410. 0010: 00000014 00003A98 00000000 00000000    ......:.........
  411.             20    15000        0        0
  412. 0020: 27100100 00010000 424F4459 00003A98    '.......BODY..:.
  413.      10000 1 0    1.0   B O D Y     15000
  414.  
  415. 0000000..03 = "FORM", identifies this as an IFF format file.
  416. FORM+00..03 (ULONG) = number of bytes that follow.  (Unsigned long int.)
  417. FORM+03..07 = "8SVX", identifies this as an 8-bit sampled voice.
  418.  
  419. ????+00..03 = "VHDR", Voice8Header, describes the parameters for the BODY.
  420. VHDR+00..03 (ULONG) = number of bytes to follow. 
  421. VHDR+04..07 (ULONG) = samples in the high octave 1-shot part.
  422. VHDR+08..0B (ULONG) = samples in the high octave repeat part.
  423. VHDR+0C..0F (ULONG) = samples per cycle in high octave (if repeating), else 0.
  424. VHDR+10..11 (UWORD) = samples per second.  (Unsigned 16-bit quantity.)
  425. VHDR+12     (UBYTE) = number of octaves of waveforms in sample.
  426. VHDR+13     (UBYTE) = data compression (0=none, 1=Fibonacci-delta encoding).
  427. VHDR+14..17 (FIXED) = volume.  (The number 65536 means 1.0 or full volume.)
  428.  
  429. ????+00..03 = "BODY", identifies the start of the audio data.
  430. BODY+00..03 (ULONG) = number of bytes to follow.
  431. BODY+04..NNNNN      = Data, signed bytes, from -128 to +127.
  432.  
  433. 0030: 04030201 02030303 04050605 05060605
  434. 0040: 06080806 07060505 04020202 01FF0000
  435. 0050: 00000000 FF00FFFF FFFEFDFD FDFEFFFF
  436. 0060: FDFDFF00 00FFFFFF 00000000 00FFFF00
  437. 0070: 00000000 00FF0000 00FFFEFF 00000000
  438. 0080: 00010000 000101FF FF0000FE FEFFFFFE
  439. 0090: FDFDFEFD FDFFFFFC FDFEFDFD FEFFFEFE
  440. 00A0: FFFEFEFE FEFEFEFF FFFFFEFF 00FFFF01
  441.  
  442. This small section of the audio sample shows the number ranging from -5 (0xFD)
  443. to +8 (0x08).  Warning: Do not assume that the BODY starts 48 bytes into the
  444. file.  In addition to "VHDR", chunks labeled "NAME", "AUTH", "ANNO", or 
  445. "(c) " may be present, and may be in any order.  You will have to check the
  446. byte count in each chunk to determine how many bytes to skip.
  447.  
  448. ------------------------------------------------------------------------
  449. Playing sound on a PC
  450. ---------------------
  451.  
  452. From: Eric A Rasmussen
  453.  
  454. Any turbo PC (8088 at 8 Mhz or greater)/286/386/486/etc. can produce a quality
  455. playback of single channel 8 bit sounds on the internal (1 bit, 1 channel)
  456. speaker by utilizing Pulse-Width-Modulation, which toggles the speaker faster
  457. than it can physically move to simulate positions between fully on and fully
  458. off.  There are several PD programs of this nature that I know of:
  459.  
  460. REMAC  - Plays MAC format sound files.  Files on the Macintosh, at least the
  461.          sound files that I've ripped apart, seem to contain 3 parts.  The
  462.          first two are info like what the file icon looks like and other
  463.          header type info.  The third part contains the raw sample data, and
  464.          it is this portion of the file which is saved to a seperate file,
  465.          often named with the .snd extension by PC users.  Personally, I like
  466.          to name the files .s1, .s2, .s3, or .s4 to indicate the sampling rate
  467.          of the file. (-s# is how to specify the playback rate in REMAC.)
  468.          REMAC provides playback rates of 5550hz, 7333hz, 11 khz, & 22 khz.
  469. REMAC2 - Same as REMAC, but sounds better on higher speed machines.
  470. REPLAY - Basically same as REMAC, but for playback of Atari ST sounds. 
  471.          Apparently, the Atari has two sound formats, one of which sounds like
  472.          garbage if played by REMAC or REPLAY in the incorrect mode.  The
  473.          other file format works fine with REMAC and so appears to be 'normal'
  474.          unsigned 8-bit data.  REPLAY provides playback rates of 11.5 khz,
  475.          12.5 khz, 14 khz, 16 khz, 18.5 khz, 22khz, & 27 khz.
  476.  
  477. These three programs are all by the same author, Richard E. Zobell who does
  478. not have an internet mail address to my knowledge, but does have a GEnie email
  479. address of R.ZOBELL. 
  480.  
  481. Additionally, there are various stand-alone demos which use the internal
  482. speaker, of which there is one called mushroom which plays a 30 second
  483. advertising jingle for magic mushroom room deoderizers which is pretty
  484. humerous.  I've used this player to playback samples that I ripped out of the
  485. commercial game program Mean Streets, which uses something they call RealSound
  486. (tm) to playback digital samples on the internal speaker. (Of course, I only do
  487. this on my own system, and since I own the game, I see no problems with it.)
  488.  
  489. For owners of 8 Mhz 286's and above, the option to play 4 channel 8 bit sounds
  490. (with decent quality) on the internal speaker is also a reality.  Quite a
  491. number of PD programs exist to do this, including, but not limited to:
  492.  
  493. ModEdit, ModPlay, ScreamTracker, STM, Star Trekker, Tetra, and probably a few
  494. more.  
  495.  
  496. All these programs basically make use of various sound formats used by the
  497. Amiga line of computers.  These include .stm files, .mod files
  498. [a.k.a. mod. files], and .nst files [really the same hing].  Also,
  499. these programs pretty much all have the option to playback the 
  500. sound to add-on hardware such as the SoundBlaster card, the Covox series of
  501. devices, and also to direct the data to either one or two (for stereo)
  502. parallel ports, which you could attach your own D/A's to.  (From what I have
  503. seen, the Covox is basically an small amplified speaker with a D/A which plugs
  504. into the parallel port.  This sounds very similiar to the Disney Sound System
  505. (DSS) which people have been talking about recently.)  
  506.  
  507. ------------------------------------------------------------------------
  508. The EA-IFF-85 documentation
  509. ---------------------------
  510.  
  511. From: dgc3@midway.uchicago.edu
  512.  
  513. As promised, here's an ftp location for the EA-IFF-85 documentation.  It's
  514. the November 1988 release as revised by Commodore (the last public release),
  515. with specifications for IFF FORMs for graphics, sound, formatted text, and
  516. more.  IFF FORMS now exist for other media, including structured drawing, and
  517. new documentation is now available only from Commodore.
  518.  
  519. The documentation is at grind.isca.uiowa.edu, in the directory
  520. /amiga/f1/ff185.  The complete file list is as follows:
  521.  
  522. DOCUMENTS.zoo    
  523. EXAMPLES.zoo     
  524. EXECUTABLE.zoo   
  525. INCLUDE.zoo      
  526. LINKER_INFO.zoo  
  527. OBJECT.zoo       
  528. SOURCE.zoo       
  529. TP_IFF_Specs.zoo 
  530.  
  531. All files except DOCUMENTS.zoo are Amiga-specific, but may be used as a basis
  532. for conversion to other platforms.  Well, I take that tentatively back.  I
  533. don't know what TP_IFF_Specs.zoo contains, so it might be non-Amiga-specific.
  534.  
  535. ------------------------------------------------------------------------
  536. US Federal Standard 1016 availability
  537. -------------------------------------
  538.  
  539. From: jpcampb@afterlife.ncsc.mil (Joe Campbell)
  540.  
  541. The U.S. DoD's Federal-Standard-1016 based 4800 bps code excited linear
  542. prediction voice coder version 3.2 (CELP 3.2) Fortran and C simulation
  543. source codes are available for worldwide distribution (on DOS
  544. diskettes, but configured to compile on Sun SPARC stations) from NTIS
  545. and DTIC.  Example input and processed speech files are included.  A
  546. Technical Information Bulletin (TIB), "Details to Assist in
  547. Implementation of Federal Standard 1016 CELP," and the official
  548. standard, "Federal Standard 1016, Telecommunications:  Analog to
  549. Digital Conversion of Radio Voice by 4,800 bit/second Code Excited
  550. Linear Prediction (CELP)," are also available.
  551.  
  552. This is available through the National Technical Information Service:
  553.  
  554. NTIS
  555. U.S. Department of Commerce
  556. 5285 Port Royal Road
  557. Springfield, VA  22161
  558. USA
  559. (703) 487-4650
  560.  
  561. The "AD" ordering number for the CELP software is AD M000 118
  562. (US$ 90.00) and for the TIB it's AD A256 629 (US$ 17.50).  The LPC-10
  563. standard, described below, is FIPS Pub 137 (US$ 12.50).  There is a
  564. $3.00 shipping charge on all U.S. orders.  The telephone number for
  565. their automated system is 703-487-4650, or 703-487-4600 if you'd prefer
  566. to talk with a real person.
  567.  
  568. (U.S. DoD personnel and contractors can receive the package from the
  569. Defense Technical Information Center:  DTIC, Building 5, Cameron
  570. Station, Alexandria, VA 22304-6145.  Their telephone number is
  571. 703-274-7633.)
  572.  
  573. The following articles describe the Federal-Standard-1016 4.8-kbps CELP
  574. coder (it's unnecessary to read more than one):
  575.  
  576. Campbell, Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch,
  577. "The Federal Standard 1016 4800 bps CELP Voice Coder," Digital Signal
  578. Processing, Academic Press, 1991, Vol. 1, No. 3, p. 145-155.
  579.  
  580. Campbell, Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch,
  581. "The DoD 4.8 kbps Standard (Proposed Federal Standard 1016),"
  582. in Advances in Speech Coding, ed. Atal, Cuperman and Gersho,
  583. Kluwer Academic Publishers, 1991, Chapter 12, p. 121-133.
  584.  
  585. Campbell, Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch, "The
  586. Proposed Federal Standard 1016 4800 bps Voice Coder:  CELP," Speech
  587. Technology Magazine, April/May 1990, p. 58-64.
  588.  
  589.  
  590. The U.S. DoD's Federal-Standard-1015/NATO-STANAG-4198 based 2400 bps
  591. linear prediction coder (LPC-10) was republished as a Federal
  592. Information Processing Standards Publication 137 (FIPS Pub 137).
  593. It is described in:
  594.  
  595. Thomas E. Tremain, "The Government Standard Linear Predictive Coding
  596. Algorithm:  LPC-10," Speech Technology Magazine, April 1982, p. 40-49.
  597.  
  598. There is also a section about FS-1015 in the book:
  599. Panos E. Papamichalis, Practical Approaches to Speech Coding,
  600. Prentice-Hall, 1987.
  601.  
  602. The voicing classifier used in the enhanced LPC-10 (LPC-10e) is described in:
  603. Campbell, Joseph P., Jr. and T. E. Tremain, "Voiced/Unvoiced Classification
  604. of Speech with Applications to the U.S. Government LPC-10E Algorithm,"
  605. Proceedings of the IEEE International Conference on Acoustics, Speech, and
  606. Signal Processing, 1986, p. 473-6.
  607.  
  608. Copies of the official standard
  609. "Federal Standard 1016, Telecommunications: Analog to Digital Conversion
  610. of Radio Voice by 4,800 bit/second Code Excited Linear Prediction (CELP)"
  611. are available for US$ 5.00 each from:
  612.  
  613. GSA Federal Supply Service Bureau
  614. Specification Section, Suite 8100
  615. 470 E. L'Enfant Place, S.W.
  616. Washington, DC  20407
  617. (202)755-0325
  618.  
  619. Realtime DSP code for FS-1015 and FS-1016 is sold by:
  620.  
  621. John DellaMorte
  622. DSP Software Engineering
  623. 165 Middlesex Tpk, Suite 206
  624. Bedford, MA  01730
  625. USA
  626. 1-617-275-3733
  627. 1-617-275-4323 (fax)
  628. dspse.bedford@channel1.com
  629.  
  630. DSP Software Engineering's FS-1016 code can run on a DSP Research's Tiger 30
  631. (a PC board with a TMS320C3x and analog interface suited to development work).
  632.  
  633. DSP Research                
  634. 1095 E. Duane Ave.          
  635. Sunnyvale, CA  94086        
  636. USA
  637. (408)773-1042               
  638. (408)736-3451 (fax)         
  639.  
  640. From: cfreese@super.org (Craig F. Reese)
  641. Newsgroups: comp.speech,comp.dsp,comp.compression.research
  642. Subject: CELP 3.2a release now available
  643. Organization: Supercomputing Research Center (Bowie, MD)
  644. Date: Tue, 3 Aug 1993 14:55:25 GMT
  645.  
  646. 3 August 1993
  647.  
  648. CELP 3.2a Release
  649.  
  650. Dear CELPers,
  651.  
  652. We have placed an updated version of the FS-1016 CELP 3.2 code in the
  653. anonymous FTP area on super.org.  It's in:
  654.  
  655.   /pub/celp_3.2a.tar.Z (please be sure to do the ftp in binary mode).
  656.  
  657. This is essentially the PC release that was on fumar, except that we
  658. started directly from the PC disks.  The value added is that we have
  659. made over 69 corrections and fixes.  Most of these were necessary
  660. because of the 8 character file name limit on DOS, but there are some
  661. others, as well.
  662.  
  663. The code (C, FORTRAN, diskio) all has been built and tested on a Sun4
  664. under SunOS4.1.3.  If you want to run it somewhere else, then you may
  665. have to do a bit of work.  (A Solaris 2.x-compatible release is
  666. planned soon.)
  667.  
  668. [One note to PCers.  The files:
  669. [
  670. [       cbsearch.F celp.F csub.F mexcite.F psearch.F
  671. [
  672. [are meant to be passed through the C preprocessor (cpp).
  673. [We gather that DOS (or whatever it's called) can't distinguish 
  674. [the .F from a .f.  Be careful!
  675.  
  676. Very limited support is available from the authors (Joe, et al.).
  677. Please do not send questions or suggestions without first reading the
  678. documentation (README files, the Technical Information Bulletin, etc.).
  679. The authors would enjoy hearing from you, but they have limited time
  680. for support and would like to use it as efficiently as possible.  They
  681. welcome bug reports, but, again, please read the documentation first.
  682. All users of FS-1016 CELP software are strongly encouraged to acquire
  683. the latest release (version 3.2a as of this writing).
  684.  
  685. We do not know how long we will be able to leave the software on this
  686. site, but it should be _at_least_ through 1 October 1993 (if you find
  687. it missing, please drop me (Craig) a note).  Please try to get the
  688. software during off hours (8 p.m. - 7 a.m. Eastern Standard time) or
  689. folks here might complain and we'll have to get rid of the code (if
  690. that happens, we'll try to pass it on to someone else, who can put it
  691. on the net).  We would be more than happy for someone to copy it and
  692. make it available elsewhere.
  693.  
  694. Good Luck,
  695.  
  696. Craig F. Reese  (cfreese@super.org)
  697. IDA/Supercomputing Research Center
  698.  
  699. Joe Campbell (jpcampb@afterlife.ncsc.mil)
  700. Department of Defense
  701.  
  702. P.S.  Just so you all know, I (Craig) am not actually involved in
  703. CELP work.  I mainly got with Joe to help make the software available
  704. on the Internet.  In the course of doing so, I cleaned up much of it,
  705. but I am not, by any stretch, a CELP expert and will most likely
  706. be unable to answer any technical questions concerning it. ;^)
  707.  
  708. From: tobiasr@monolith.lrmsc.loral.com (Richard Tobias)
  709.  
  710. For U.S. FED-STD-1016 (4800 bps CELP) _realtime_ DSP code and
  711. information about products using this code using the AT&T DSP32C and
  712. AT&T DSP3210, contact:
  713.  
  714. White Eagle Systems Technology, Inc.
  715. 1123 Queensbridge Way
  716. San Jose, CA 95120
  717. (408) 997-2706
  718. (408) 997-3584 (fax)
  719. rjjt@netcom.com
  720.  
  721. From: Cole Erskine <cole@analogical.com>
  722.  
  723. [paraphrased]
  724.  
  725. Analogical Systems has a _real-time_ multirate implementation of U.S.
  726. Federal Standard 1016 CELP operating at bit rates of 4800, 7200, and
  727. 9600 bps on a single 27MHz Motorola DSP56001. Source and object code
  728. is available for a one-time license fee.
  729.  
  730. FREE, _real-time_ demonstration software for the Ariel PC-56D is
  731. available for those who already have such a board by contacting
  732. Analogical Systems.  The demo software allows you to record and
  733. playback CELP files to and from the PC's hard disk.
  734.  
  735. Analogical Systems
  736. 2916 Ramona Street
  737. Palo Alto, CA 94306
  738. Tel: +1 (415) 323-3232
  739. FAX: +1 (415) 323-4222
  740.  
  741. ------------------------------------------------------------------------
  742. Creative Voice (VOC) file format
  743. --------------------------------
  744.  
  745. From: galt@dsd.es.com
  746.  
  747. (byte numbers are hex!)
  748.  
  749.     HEADER (bytes 00-19)
  750.     Series of DATA BLOCKS (bytes 1A+) [Must end w/ Terminator Block]
  751.  
  752. - ---------------------------------------------------------------
  753.  
  754. HEADER:
  755. =======
  756.      byte #     Description
  757.      ------     ------------------------------------------
  758.      00-12      "Creative Voice File"
  759.      13         1A (eof to abort printing of file)
  760.      14-15      Offset of first datablock in .voc file (std 1A 00
  761.                 in Intel Notation)
  762.      16-17      Version number (minor,major) (VOC-HDR puts 0A 01)
  763.      18-19      2's Comp of Ver. # + 1234h (VOC-HDR puts 29 11)
  764.  
  765. - ---------------------------------------------------------------
  766.  
  767. DATA BLOCK:
  768. ===========
  769.  
  770.    Data Block:  TYPE(1-byte), SIZE(3-bytes), INFO(0+ bytes)
  771.    NOTE: Terminator Block is an exception -- it has only the TYPE byte.
  772.  
  773.       TYPE   Description     Size (3-byte int)   Info
  774.       ----   -----------     -----------------   -----------------------
  775.       00     Terminator      (NONE)              (NONE)
  776.       01     Sound data      2+length of data    *
  777.       02     Sound continue  length of data      Voice Data
  778.       03     Silence         3                   **
  779.       04     Marker          2                   Marker# (2 bytes)
  780.       05     ASCII           length of string    null terminated string
  781.       06     Repeat          2                   Count# (2 bytes)
  782.       07     End repeat      0                   (NONE)
  783.       08     Extended        4                   ***
  784.  
  785.       *Sound Info Format:       **Silence Info Format:
  786.        ---------------------      ----------------------------
  787.        00   Sample Rate           00-01  Length of silence - 1
  788.        01   Compression Type      02     Sample Rate
  789.        02+  Voice Data
  790.  
  791.     ***Extended Info Format:
  792.        ---------------------
  793.        00-01  Time Constant: Mono: 65536 - (256000000/sample_rate)
  794.                              Stereo: 65536 - (25600000/(2*sample_rate))
  795.        02     Pack
  796.        03     Mode: 0 = mono
  797.                     1 = stereo
  798.  
  799.  
  800.   Marker#           -- Driver keeps the most recent marker in a status byte
  801.   Count#            -- Number of repetitions + 1
  802.                          Count# may be 1 to FFFE for 0 - FFFD repetitions
  803.                          or FFFF for endless repetitions
  804.   Sample Rate       -- SR byte = 256-(1000000/sample_rate)
  805.   Length of silence -- in units of sampling cycle
  806.   Compression Type  -- of voice data
  807.                          8-bits    = 0
  808.                          4-bits    = 1
  809.                          2.6-bits  = 2
  810.                          2-bits    = 3
  811.                          Multi DAC = 3+(# of channels) [interesting--
  812.                                        this isn't in the developer's manual]
  813.  
  814. ------------------------------------------------------------------------
  815. RIFF WAVE (.WAV) file format
  816. ----------------------------
  817.  
  818. RIFF is a format by Microsoft and IBM which is similar in spirit and
  819. functionality as EA-IFF-85, but not compatible (and it's in
  820. little-endian byte order, of course :-).  WAVE is RIFF's equivalent of
  821. AIFF, and its inclusion in Microsoft Windows 3.1 has suddenly made it
  822. important to know about.
  823.  
  824. Rob Ryan was kind enough to send me a description of the RIFF format.
  825. Unfortunately, it is too big to include here (27 k), but I've made it
  826. available for anonymous ftp as ftp.cwi.nl:/pub/audio/RIFF-format.
  827.  
  828. The complete definition of the WAVE file format as defined by IBM and
  829. Microsoft is available for anonymous FTP from ftp.microsoft.com, in
  830. directory developer/MSDN/CD8 as file RIFFNE.ZIP, which contains a MS
  831. help file (riffne.hlp).
  832.  
  833. ------------------------------------------------------------------------
  834. U-LAW and A-LAW definitions
  835. ---------------------------
  836.  
  837. [Adapted from information provided by duggan@cc.gatech.edu (Rick
  838. Duggan) and davep@zenobia.phys.unsw.EDU.AU (David Perry)]
  839.  
  840. u-LAW (really mu-LAW) is
  841.  
  842.           sgn(m)   (     |m |)       |m |
  843.    y=    ------- ln( 1+ u|--|)       |--| =< 1
  844.          ln(1+u)   (     |mp|)       |mp|         
  845.  
  846. A-LAW is
  847.  
  848.      |     A    (m )                 |m |    1
  849.      |  ------- (--)                 |--| =< - 
  850.      |  1+ln A  (mp)                 |mp|    A     
  851.    y=|
  852.      | sgn(m) (        |m |)    1    |m |
  853.      | ------ ( 1+ ln A|--|)    - =< |--| =< 1
  854.      | 1+ln A (        |mp|)    A    |mp|         
  855.  
  856. Values of u=100 and 255, A=87.6, mp is the Peak message value, m is
  857. the current quantised message value.  (The formulae get simpler if you
  858. substitute x for m/mp and sgn(x) for sgn(m); then -1 <= x <= 1.)
  859.  
  860. Converting from u-LAW to A-LAW is in a sense "lossy" since there are
  861. quantizing errors introduced in the conversion.
  862.  
  863. "..the u-LAW used in North America and Japan, and the
  864. A-LAW used in Europe and the rest of the world and
  865. international routes.."
  866.  
  867. References:
  868.  
  869. Modern Digital and Analog Communication Systems, B.P.Lathi., 2nd ed.
  870. ISBN 0-03-027933-X
  871.  
  872. Transmission Systems for Communications
  873. Fifth Edition
  874. by Members of the Technical Staff at Bell Telephone Laboratories
  875. Bell Telephone Laboratories, Incorporated
  876. Copyright 1959, 1964, 1970, 1982
  877.  
  878. A note on the resolution of U-LAW by Frank Klemm <pfk@rz.uni-jena.de>:
  879.  
  880. 8 bit U-LAW has the same lowest  magnitude like 12 bit linear and 12 bit
  881. U-LAW like 16 linear.
  882.  
  883. Device/Coding   Resolution              Resolution
  884.                 on maximal level        on low level
  885.  8 bit linear    8                       8
  886.  8 bit ulaw      6                      12      (used for digital telephone)
  887. 12 bit linear   12                      12
  888. 12 bit ulaw     10                      16      (used in DAT/Longplay)
  889. 16 bit linear   16                      16
  890.  
  891. estimated for some analoge technique:
  892. tape recorder (HiFi DIN)
  893.                  8                       9      (no Problem today)
  894. tape recorder (semiprofessional)
  895.                 10.5                    13.5 
  896.  
  897. ------------------------------------------------------------------------
  898. AVR File Format
  899. ---------------
  900.  
  901. From: hyc@hanauma.Jpl.Nasa.Gov (Howard Chu)
  902.  
  903. A lot of PD software exists to play Mac .snd files on the ST. One other
  904. format that seems pretty popular (used by a number of commercial packages)
  905. is the AVR format (from Audio Visual Research). This format has a 128 byte
  906. header that looks like this:
  907.  
  908.         char magic[4]="2BIT";
  909.         char name[8];           /* null-padded sample name */
  910.         short mono;             /* 0 = mono, 0xffff = stereo */
  911.         short rez;              /* 8 = 8 bit, 16 = 16 bit */
  912.         short sign;             /* 0 = unsigned, 0xffff = signed */
  913.         short loop;             /* 0 = no loop, 0xffff = looping sample */
  914.         short midi;             /* 0xffff = no MIDI note assigned,
  915.                                    0xffXX = single key note assignment
  916.                                    0xLLHH = key split, low/hi note */
  917.         long rate;              /* sample frequency in hertz */
  918.         long size;              /* sample length in bytes or words (see rez) */
  919.         long lbeg;              /* offset to start of loop in bytes or words.
  920.                                    set to zero if unused. */
  921.         long lend;              /* offset to end of loop in bytes or words.
  922.                                    set to sample length if unused. */
  923.         short res1;             /* Reserved, MIDI keyboard split */
  924.         short res2;             /* Reserved, sample compression */
  925.         short res3;             /* Reserved */
  926.         char ext[20];           /* Additional filename space, used
  927.                                    if (name[7] != 0) */
  928.         char user[64];          /* User defined. Typically ASCII message. */
  929.  
  930. -----------------------------------------------------------------------
  931. The Amiga MOD Format
  932. --------------------
  933.  
  934. From: norlin@mailhost.ecn.uoknor.edu (Norman Lin)
  935.  
  936. MOD files are music files containing 2 parts:
  937.  
  938. (1) a bank of digitized samples
  939. (2) sequencing information describing how and when to play the samples
  940.  
  941. MOD files originated on the Amiga, but because of their flexibility
  942. and the extremely large number of MOD files available, MOD players
  943. are now available for a variety of machines (IBM PC, Mac, Sparc
  944. Station, etc.)
  945.  
  946. The samples in a MOD file are raw, 8 bit, signed, headerless, linear
  947. digital data.  There may be up to 31 distinct samples in a MOD file,
  948. each with a length of up to 128K (though most are much smaller; say,
  949. 10K - 60K).  An older MOD format only allowed for up to 15 samples in
  950. a MOD file; you don't see many of these anymore.  There is no standard
  951. sampling rate for these samples.  [But see below.]
  952.  
  953. The sequencing information in a MOD file contains 4 tracks of
  954. information describing which, when, for how long, and at what frequency
  955. samples should be played.  This means that a MOD file can have up
  956. to 31 distinct (digitized) instrument sounds, with up to 4 playing
  957. simultaneously at any given point.  This allows a wide variety
  958. of orchestrational possibilities, including use of voice samples
  959. or creation of one's own instruments (with appropriate sampling
  960. hardware/software).  The ability to use one's own samples as instruments
  961. is a flexibility that other music files/formats do not share, and
  962. is one of the reasons MOD files are so popular, numerous, and diverse.
  963.  
  964. 15 instrument MODs, as noted above, are somewhat older than 31
  965. instrument MODs and are not (at least not by me) seen very often
  966. anymore.  Their format is identical to that of 31 instrument MODs
  967. except:
  968.  
  969. (1) Since there are only 15 samples, the information for the last (15th)
  970.     sample starts at byte 440 and goes through byte 469.
  971. (2) The songlength is at byte 470 (contrast with byte 950 in 31 instrument
  972.     MOD)
  973. (3) Byte 471 appears to be ignored, but has been observed to be 127.
  974.     (Sorry, this is from observation only)
  975. (4) Byte 472 begins the pattern sequence table (contrast with byte 952
  976.     in a 31 instrument MOD)
  977. (5) Patterns start at byte 600 (contrast with byte 1084 in 31 instrument MOD)
  978.  
  979. "ProTracker," an Amiga MOD file creator/editor, is available for ftp
  980. everywhere as pt??.lzh.
  981.  
  982. From: Apollo Wong <apollo@ee.ualberta.ca>
  983.  
  984. From: M.J.H.Cox@bradford.ac.uk (Mark Cox)
  985. Newsgroups: alt.sb.programmer
  986. Subject: Re: Format for MOD files...
  987. Message-ID: <1992Mar18.103608.4061@bradford.ac.uk>
  988. Date: 18 Mar 92 10:36:08 GMT
  989. Organization: University of Bradford, UK
  990.  
  991. wdc50@DUTS.ccc.amdahl.com (Winthrop D Chan) writes:
  992. >I'd like to know if anyone has a reference document on the format of the
  993. >Amiga Sound/NoiseTracker (MOD) files. The author of Modplay said he was going
  994. >to release such a document sometime last year, but he never did. If anyone
  995.  
  996. I found this one, which covers it better than I can explain it - if you
  997. use this in conjunction with the documentation that comes with Norman
  998. Lin's Modedit program it should pretty much cover it.
  999.  
  1000. Mark J Cox
  1001.  
  1002. /***********************************************************************
  1003.  
  1004. Protracker 1.1B Song/Module Format:
  1005. -----------------------------------
  1006.  
  1007. Offset  Bytes  Description
  1008. ------  -----  -----------
  1009.    0     20    Songname. Remember to put trailing null bytes at the end...
  1010.  
  1011. Information for sample 1-31:
  1012.  
  1013. Offset  Bytes  Description
  1014. ------  -----  -----------
  1015.   20     22    Samplename for sample 1. Pad with null bytes.
  1016.   42      2    Samplelength for sample 1. Stored as number of words.
  1017.                Multiply by two to get real sample length in bytes.
  1018.   44      1    Lower four bits are the finetune value, stored as a signed
  1019.                four bit number. The upper four bits are not used, and
  1020.                should be set to zero.
  1021.                Value:  Finetune:
  1022.                  0        0
  1023.                  1       +1
  1024.                  2       +2
  1025.                  3       +3
  1026.                  4       +4
  1027.                  5       +5
  1028.                  6       +6
  1029.                  7       +7
  1030.                  8       -8
  1031.                  9       -7
  1032.                  A       -6
  1033.                  B       -5
  1034.                  C       -4
  1035.                  D       -3
  1036.                  E       -2
  1037.                  F       -1
  1038.  
  1039.   45      1    Volume for sample 1. Range is $00-$40, or 0-64 decimal.
  1040.   46      2    Repeat point for sample 1. Stored as number of words offset
  1041.                from start of sample. Multiply by two to get offset in bytes.
  1042.   48      2    Repeat Length for sample 1. Stored as number of words in
  1043.                loop. Multiply by two to get replen in bytes.
  1044.  
  1045. Information for the next 30 samples starts here. It's just like the info for
  1046. sample 1.
  1047.  
  1048. Offset  Bytes  Description
  1049. ------  -----  -----------
  1050.   50     30    Sample 2...
  1051.   80     30    Sample 3...
  1052.    .
  1053.    .
  1054.    .
  1055.  890     30    Sample 30...
  1056.  920     30    Sample 31...
  1057.  
  1058. Offset  Bytes  Description
  1059. ------  -----  -----------
  1060.  950      1    Songlength. Range is 1-128.
  1061.  951      1    Well... this little byte here is set to 127, so that old
  1062.                trackers will search through all patterns when loading.
  1063.                Noisetracker uses this byte for restart, but we don't.
  1064.  952    128    Song positions 0-127. Each hold a number from 0-63 that
  1065.                tells the tracker what pattern to play at that position.
  1066. 1080      4    The four letters "M.K." - This is something Mahoney & Kaktus
  1067.                inserted when they increased the number of samples from
  1068.                15 to 31. If it's not there, the module/song uses 15 samples
  1069.                or the text has been removed to make the module harder to
  1070.                rip. Startrekker puts "FLT4" or "FLT8" there instead.
  1071.  
  1072. Offset  Bytes  Description
  1073. ------  -----  -----------
  1074. 1084    1024   Data for pattern 00.
  1075.    .
  1076.    .
  1077.    .
  1078. xxxx  Number of patterns stored is equal to the highest patternnumber
  1079.       in the song position table (at offset 952-1079).
  1080.  
  1081. Each note is stored as 4 bytes, and all four notes at each position in
  1082. the pattern are stored after each other.
  1083.  
  1084. 00 -  chan1  chan2  chan3  chan4
  1085. 01 -  chan1  chan2  chan3  chan4
  1086. 02 -  chan1  chan2  chan3  chan4
  1087. etc.
  1088.  
  1089. Info for each note:
  1090.  
  1091.  _____byte 1_____   byte2_    _____byte 3_____   byte4_
  1092. /                \ /      \  /                \ /      \
  1093. 0000          0000-00000000  0000          0000-00000000
  1094.  
  1095. Upper four    12 bits for    Lower four    Effect command.
  1096. bits of sam-  note period.   bits of sam-
  1097. ple number.                  ple number.
  1098.  
  1099. Periodtable for Tuning 0, Normal
  1100.   C-1 to B-1 : 856,808,762,720,678,640,604,570,538,508,480,453
  1101.   C-2 to B-2 : 428,404,381,360,339,320,302,285,269,254,240,226
  1102.   C-3 to B-3 : 214,202,190,180,170,160,151,143,135,127,120,113
  1103.  
  1104. To determine what note to show, scan through the table until you find
  1105. the same period as the one stored in byte 1-2. Use the index to look
  1106. up in a notenames table.
  1107.  
  1108. This is the data stored in a normal song. A packed song starts with the
  1109. four letters "PACK", but i don't know how the song is packed: You can
  1110. get the source code for the cruncher/decruncher from us if you need it,
  1111. but I don't understand it; I've just ripped it from another tracker...
  1112.  
  1113. In a module, all the samples are stored right after the patterndata.
  1114. To determine where a sample starts and stops, you use the sampleinfo
  1115. structures in the beginning of the file (from offset 20). Take a look
  1116. at the mt_init routine in the playroutine, and you'll see just how it
  1117. is done.
  1118.  
  1119. Lars "ZAP" Hamre/Amiga Freelancers
  1120.  
  1121. ***********************************************************************/
  1122.  
  1123. -- 
  1124. Mark J Cox -----
  1125. Bradford, UK ---
  1126.  
  1127.  
  1128. PS: A file with even *much* more info on MOD files, compiled by Lars
  1129. Hamre, is available from ftp.cwi.nl:/pub/audio/MOD-info.  Enjoy!
  1130.  
  1131.  
  1132. FTP sites for MODs and MOD players
  1133. ----------------------------------
  1134.  
  1135. Subject: MODS AND PLAYERS!! **READ** info/where to get them
  1136. From: cjohnson@tartarus.uwa.edu.au (Christopher Johnson)
  1137. Newsgroups: alt.binaries.sounds.d
  1138. Message-ID: <1h32ivINNglu@uniwa.uwa.edu.au>
  1139. Date: 21 Dec 92 00:19:43 GMT
  1140. Organization: The University of Western Australia
  1141.  
  1142. Hello world,
  1143.  
  1144. For all those asking, here is where to get those mod players and mods.
  1145.  
  1146. SNAKE.MCS.KENT.EDU is the best site for general stuff.  look in /pub/SB-Adlib
  1147.  
  1148. Simtel-20 or archie.au(simtel mirror) in <msdos.sound>
  1149.  
  1150. for windows players ftp.cica.indiana.edu in pub/pc/win3/sound
  1151.  
  1152. here is a short list of players
  1153.  
  1154. mp or modplay   BEST OVERALL                    mp219b.zip      
  1155.         simtel and snake
  1156.  
  1157. wowii           best for vga/fast machines      wowii12b.zip    
  1158.         simtel and snake
  1159.  
  1160. trakblaster     best for compatability          trak-something  
  1161.         simtel and snake        two versions, old one for slow
  1162.         machines
  1163.  
  1164. ss              cute display(hifi)              have_sex.arj
  1165.         found on local BBS (western Australia White Ghost)
  1166.  
  1167. superpro player generally good                  ssp.zip or similar
  1168.         found on night owl 7 CD
  1169.  
  1170. player?         cute display(hifi)              player.zip or similar
  1171.         found on night owl 7 CD
  1172.  
  1173. WINDOWS
  1174.  
  1175. Winmod pro      does protracker                 wmp????.zip
  1176.         cica
  1177.  
  1178. winmod          more stable                     winmod12.zip or similar
  1179.         cica
  1180.  
  1181. Hope this helps, e-mail me if you find any more players and I will add them in for the next time mod player requests get a
  1182. little out of hand.
  1183.  
  1184. for mods ftp to wuarchive.wustl.edu and go to the amiga music directory (pub/amiga/music/ntsb ?????)  that should do you for
  1185. a while
  1186.  
  1187. see you soon
  1188.  
  1189. Chris.
  1190.  
  1191. -----------------------------------------------------------------------
  1192. The Sample Vision Format
  1193. ------------------------
  1194.  
  1195. From: "tim.dorcas@enest.com" <KURTZ@URIACC.URI.EDU>
  1196.  
  1197. First, Sample Vision is a program used by professional musicians to
  1198. send and receive samples via a MIDI interface to the PC. While on the
  1199. PC, you can edit several parameters including loop points, pitch, time
  1200. compression, normalize, sample rate, ect.  The list of supported
  1201. samplers include: AKAI {S700,X700,S900, S950,S612,S1000/1100},
  1202. Casio{FZ1,FZ10M,FZ20M}, Ensoniq{EPS,EPS16,ASR10,Mirage},
  1203. Emu{Emax,EmaxII}, Korg{DSS1,DSM1,T workstation}, Oberheim DPX-1,
  1204. Peavey DPM-3, Roland {S10,MKS100,S220,S50,S330,S550}, Sequential
  1205. Circuits Prophet 2000/2002, Sample Dump Standard devices, Yamaha
  1206. TX16W.
  1207.  
  1208. The .smp format breaks down like this:
  1209.  
  1210. Offset     Size        Description
  1211. 000        18          'SOUND SAMPLE DATA ' ASCII FILE ID
  1212. 0018       04          '2.1 '   ASCII FILE VERSION
  1213. 0022       60          USER COMMENTS    60 ASCII CHARACTERS
  1214. 0082       30          SAMPLE NAME    LEFT JUSTIFIED 30 ASCII CHARACTERS
  1215. 0112       04          SAMPLE SIZE   SAMPLE DATA COUNT IN WORDS
  1216. 0116       ??          SAMPLE DATA  1 WORD PER SAMPLE, LEAST SIGNIFICANT BYTE
  1217.                                     FIRST, LSW FIRST; SIGNED 16 BIT INTEGERS
  1218.  
  1219. ??         02(DW)      RESERVED
  1220. ??         04(DD)      LOOP 1 START  USE SAMPLE COUNT NOT BYTE COUNT
  1221. ??         04(DD)      LOOP 1 END
  1222. ??         01(DB)      LOOP 1 TYPE   0=LOOP OFF,1=FORWARD,2=FORWARD/BACKWARD
  1223. ??         02(DW)      LOOP 1 COUNT  TIMES TO EXECUTE LOOP BEFORE NEXT LOOP
  1224.  
  1225. THERE ARE SEVEN MORE IDENTICAL LOOP STRUCTURES FOR A TOTAL OF 8
  1226.  
  1227. ??         10          MARKER 1 NAME ASCII MARKER NAME
  1228. ??         04(DD)      MARKER 1 POSITION  FFFF MEANS UNUSED
  1229.  
  1230. THER ARE SEVEN MORE IDENTICAL MARKER STRUCTURES FOR A TOTAL OF 8
  1231.  
  1232. ??         01(DB)       MIDI UNITY PLAYBACK NOTE         MIDI NOTE TO PLAY
  1233.                                                          THE SAMPLE AT ITS
  1234.                                                          ORIGINAL PITCH
  1235. ??         04(DD)       SAMPLE RATE IN HERTZ
  1236. ??         04(DD)       SMPTE OFFSET IN SUBFRAMES
  1237. ??         04(DD)       CYCLE SIZE         SAMPLE COUNT IN ONE CYCLE OF
  1238.                                            THE SAMPLED SOUND. -1 IF UNKNOWN
  1239.  
  1240. (DD) 4 BYTES, LS BYTE FIRST, LS WORD FIRST
  1241. (DW) 2 BYTES, LS BYTE FIRST
  1242. (DB) 1 BYTE
  1243.  
  1244. That's about it. One thing I have noticed is that Sample Vision only
  1245. writes seven loop structures to file as opposed to the eight
  1246. structures it claims are written.
  1247. -----------------------------------------------------------------------
  1248. Some Miscellaneous Formats
  1249. --------------------------
  1250.  
  1251. From: bil@ccrma.Stanford.EDU (Bill Schottstaedt)
  1252.  
  1253. I thought you might find some of this information amusing -- a few
  1254. header formats I didn't find in your great audio file formats
  1255. documentation.  Some taken from the AFsp sources, or sox, or
  1256. local ancient documentation.  I also have short descriptions
  1257. of BICSF, NeXT/Sun, AIFF, RIFF, SMP, VOC, and so on, plus
  1258. full descriptions of the 2 Sound Designer formats, if you're
  1259. interested.
  1260.  
  1261.  
  1262. /* ------------------------------------ NIST ---------------------------------
  1263.  
  1264.  * 
  1265.  
  1266.  *   0: "NIST_1A"
  1267.  *   8: data_location as ASCII representation of integer
  1268.  *      (apparently always "   1024")
  1269.  *  16: start of complicated header -- full details available upon request
  1270.  *
  1271.  *  here's an example:
  1272.  *
  1273.  *  NIST_1A
  1274.  *     1024
  1275.  *  database_id -s5 TIMIT
  1276.  *  database_version -s3 1.0
  1277.  *  utterance_id -s8 aks0_sa1
  1278.  *  channel_count -i 1
  1279.  *  sample_count -i 63488
  1280.  *  sample_rate -i 16000
  1281.  *  sample_min -i -6967
  1282.  *  sample_max -i 7710
  1283.  *  sample_n_bytes -i 2
  1284.  *  sample_byte_format -s2 01
  1285.  *  sample_sig_bits -i 16
  1286.  *  end_head
  1287.  */
  1288. /* ------------------------------------ SNDT ---------------------------------
  1289.  *
  1290.  * this taken from sndrtool.c (sox-10):
  1291.  *   0: "SOUND"
  1292.  *   6: 0x1a
  1293.  *   8-11: 0
  1294.  *  12-15: nsamples
  1295.  *  16-19: 0
  1296.  *  20-23: nsamples
  1297.  *  24-25: srate
  1298.  *  26-27: 0
  1299.  *  28-29: 10
  1300.  *  30-31: 4
  1301.  *  32-> : <filename> "- File created by Sound Exchange"
  1302.  *  .->95: 0
  1303.  */
  1304. /* ------------------------------------ ESPS ---------------------------------
  1305.  
  1306.  *
  1307.  *   16: 0x00006a1a or 0x1a6a0000
  1308.  *  136: if not 0, chans + format = 32-bit float
  1309.  *  144: if not 0, chans + format = 16-bit linear
  1310.  * 
  1311.  
  1312.  *   from AFgetInfoES.c:
  1313.  * 
  1314.  
  1315.  *       Bytes     Type    Contents
  1316.  *      8 -> 11    --     Header size (bytes)
  1317.  *     12 -> 15    int    Sampled data record size
  1318.  *     16 -> 19    int    File identifier
  1319.  *     40 -> 65    char   File creation date
  1320.  *    124 -> 127   int    Number of samples (may indicate zero)
  1321.  *    132 -> 135   int    Number of doubles in a data record
  1322.  *    136 -> 139   int    Number of floats in a data record
  1323.  *    140 -> 143   int    Number of longs in a data record
  1324.  *    144 -> 147   int    Number of shorts in a data record
  1325.  *    148 -> 151   int    Number of chars in a data record
  1326.  *    160 -> 167   char   User name
  1327.  *    333 -> H-1   --     Generic header items, including "record_freq"
  1328.  *                        {followed by a "double8"}
  1329.  *      H -> ...   --     Audio data
  1330.  */
  1331. /* ------------------------------------ INRS ---------------------------------
  1332.  
  1333.  * 
  1334.  
  1335.  *   from AFgetInfoIN.c:
  1336.  * 
  1337.  
  1338.  *    INRS-Telecommunications audio file:
  1339.  *       Bytes     Type    Contents
  1340.  *      0 ->  3    float  Sampling Frequency (VAX float format)
  1341.  *      6 -> 25    char   Creation time (e.g. Jun 12 16:52:50 1990)
  1342.  *     26 -> 29    int    Number of speech samples in the file
  1343.  *   The data in an INRS-Telecommunications audio file is in 16-bit integer
  1344.  *   format.
  1345.  * 
  1346.  
  1347.  */
  1348. /* old Mus10, SAM formats, just for completeness
  1349.  *
  1350.  * These were used for sound data on the PDP-10s at SAIL and CCRMA in the
  1351.  * 70's and 80's.
  1352.  * The word length was 36-bits.
  1353.  *
  1354.  * "New" format as used by nearly all CCRMA software pre-1990:
  1355.  *
  1356.  *  WD 0 - '525252525252
  1357.  *  WD 1 - Clock rate in Hz (PDP-10 36-bit floating point)
  1358.  *  WD 2 - #samples per word,,pack-code
  1359.  *      (has # samples per word in LH, pack-code in RH)
  1360.  *      0 for 12-bit fixed point
  1361.  *      1 for 18-bit fixed point
  1362.  *      2 for  9-bit floating point incremental
  1363.  *      3 for 36-bit floating point
  1364.  *      4 for 16-bit sambox fixed point, right justified
  1365.  *      5 for 20-bit sambox fixed point
  1366.  *      6 for 20-bit right-adjusted fixed point (sambox SAT format)
  1367.  *      7 for 16-bit fixed point, left justified
  1368.  *      N>9 for N bit bytes in ILDB format
  1369.  *  WD 3 - # channels
  1370.  *      1 for MONO
  1371.  *      2 for STEREO
  1372.  *      4 for QUAD
  1373.  *  WD 4 - Maximum amplitude (if known)
  1374.  *      is a floating point number
  1375.  *      is zero if not known
  1376.  *      is maximum magnitude (abs value) of signal
  1377.  *  WD 5        number of Sambox ticks per pass
  1378.  *              (inverse of Sambox clock rate, sort of)
  1379.  *  WD 6 - Total #samples in file.
  1380.  *         If 0 then #wds_in_file*#samps_per_wd assumed.
  1381.  *  WD 7 - Block size (if any). 0 means sound is not blocked.
  1382.  *  WDs '10-'77 Reserved for EDSND usage
  1383.  *  WDs '100-'177 Text description of file (in ASCIZ format)
  1384.  *
  1385.  *
  1386.  * "Old" format
  1387.  *
  1388.  *  WD 0 - '525252525252
  1389.  *  WD 1 - Clock rate
  1390.  *      has code in LH, actual INTEGER rate in RH
  1391.  *      code=0 for 6.4Kc (or anything else)
  1392.  *          =1 for 12.8Kc, =2 for 25.6Kc, =3 for 51.2Kc
  1393.  *          =5 for 102.4Kc, =6 for 204.8Kc
  1394.  *  WD 2 - pack
  1395.  *      0 for 12 bit
  1396.  *      1 for 16 bit (18 bit)
  1397.  *      2 for 9 bit floating point incremental
  1398.  *      3 for 36-bit floating point
  1399.  *      N>9 for N bit bytes in ILDB format
  1400.  *      has # samples per word in LH.
  1401.  *  WD 3 - # channels
  1402.  *      1 for MONO
  1403.  *      2 for STEREO
  1404.  *      4 for QUAD
  1405.  *  WD 4 - Maximum amplitude (if known)
  1406.  *      is a floating point number
  1407.  *      is zero if not known
  1408.  *      is maximum magnitude (abs value) of signal
  1409.  *  WDs 5-77 Reserved for future expansion
  1410.  *  WDs 100-177 Text description of file (in ASCIZ format)
  1411.  */
  1412.  
  1413. -----------------------------------------------------------------------
  1414. Tandy Deskmate .snd Format Notes
  1415. --------------------------------
  1416.  
  1417. From: Jeffrey L. Hayes <tvdog@delphi.com>
  1418.  
  1419. Tandy .snd files are created by Sound.pdm, a program that came with the 
  1420. proprietary DeskMate environment.  They are used by Music.pdm to create 
  1421. music modules (.sng files).  DeskMate Sound and Music require the Tandy 
  1422. sound chip.  There is a program to convert RIFF WAVE and other 8-bit PCM 
  1423. formats to .snd, Conv2snd, by Kenneth Udut.  Conv2snd v.2.00 comes with 
  1424. Snd2wav, which converts .snd to RIFF WAVE.
  1425.  
  1426. There are two types of DeskMate .snd files, sound files and instrument 
  1427. files.  Both contain 8-bit unsigned PCM samples.
  1428.  
  1429. Sound files are simpler.  These are garden-variety sample files with a 
  1430. fixed-length header giving the name of the sound, the recording frequency, 
  1431. and the length of the sound.  Sound files may be recorded at 5500Hz, 11kHz 
  1432. or 22kHz.
  1433.  
  1434. Instrument files contain samples as well as frequency and looping 
  1435. information used by Music.pdm to represent an instrument.  Instrument files 
  1436. provide for attack, sustain, and decay with several samples having 
  1437. different implied frequencies and being used by Music.pdm to represent the 
  1438. instrument in different pitch ranges.  Up to 16 different notes (with 16 
  1439. different samples) can be contained in one instrument file.  Instrument 
  1440. files are always recorded at 11kHz.  Both sound files and instrument files 
  1441. may be compressed in one of two ways, "music" compression or "speech" 
  1442. compression, or they may be uncompressed.  I don't know the compression 
  1443. algorithms, but simple file comparison reveals that "music" and "speech" 
  1444. compression are almost identical.
  1445.  
  1446. The DeskMate .snd file header consists of 16 bytes of fixed header 
  1447. information followed by one or more 28-byte note records.  The sample 
  1448. information, which may be compressed, follows the header.
  1449.  
  1450. DeskMate .snd File Format - Fixed Header
  1451. ----------------------------------------
  1452.  
  1453.   offset    size      what
  1454.   ------    ----      ----
  1455.  
  1456.   0         byte      1Ah (.snd ID byte)
  1457.  
  1458.   1         byte      Compression code:  0 = no compression; 1 = music
  1459.                       compression; 2 = sound compression.
  1460.  
  1461.   2         byte      Number of notes in the instrument file.  1 if sound
  1462.                       file.
  1463.  
  1464.   3         byte      Instrument number.  0 if sound file; 0FFh if instrument
  1465.                       file with no number set.  Valid instrument numbers in
  1466.                       an instrument file are 1 to 32.  Use this field to
  1467.                       distinguish a sound file from an instrument file.
  1468.  
  1469.   4         10 bytes  Sound or instrument name.  Filled on the right with
  1470.                       nulls if less than 10 characters.
  1471.  
  1472.   0Eh       word      Sampling rate in samples per second.  Note that although
  1473.                       a sampling rate other than 5500, 11000 and 22000 can be
  1474.                       entered here, Sound.pdm will not actually play at other
  1475.                       rates.
  1476.  
  1477.   10h       variable  Note records begin, 28 bytes each.  Number of records
  1478.                       given in byte 2 above.
  1479.  
  1480.  
  1481. DeskMate .snd File Format - Note Record
  1482. ---------------------------------------
  1483.  
  1484.   0         byte      Pitch of the note:  1 = A1 in American Standard Pitch;
  1485.                       2 = A#1; etc.  A1 is lowest note allowed; highest note
  1486.                       allowed is B6 (3Fh).  Sound files have 0FFh here; so do
  1487.                       instrument files with no note set.
  1488.                           Note that Sound.pdm does not designate notes in the
  1489.                       standard manner to the user.  Although A1 and B6 in
  1490.                       Sound.pdm are the same as A1 and B6 in standard pitch,
  1491.                       Sound.pdm starts octaves at A rather than at C (as is
  1492.                       standard).  Thus, middle C, C4 in standard pitch, is C3
  1493.                       in Sound.pdm.
  1494.  
  1495.   1         byte      Sound files, and instrument files with no pitch set,
  1496.                       have 0 here.  If the pitch is set, this byte is 0FFh.
  1497.  
  1498.   2         2 bytes   Range of the note, first byte is lower limit, second
  1499.                       is higher limit.  Byte encoding as for offset 0 (i.e.,
  1500.                       01h to 3Fh).  Sound files have FF FF here; so do
  1501.                       instrument files with no range set.
  1502.  
  1503.   4         dword     Offset in the file where samples for this note begin
  1504.                       (zero-relative), after compression if that was done.
  1505.  
  1506.   8         dword     If compressed, the length of the compressed data in the
  1507.                       file for this note.  Uncompressed files have 0 here.
  1508.  
  1509.   0Ch       4 bytes   Unknown.  Set to zero.
  1510.  
  1511.   10h       dword     Number of samples in the note, after decompression if
  1512.                       necessary.
  1513.  
  1514.   14h       dword     Number of sample at start of sustain region for the
  1515.                       note, relative to the first (zeroth) sample of the note.
  1516.                       For sound files, or if sustain is not set, this field is
  1517.                       0.
  1518.  
  1519.   18h       dword     Number of sample at end of sustain region for the note,
  1520.                       relative to the first (zeroth) sample of the note.  For
  1521.                       sound files, or if sustain is not set, this field is 0.
  1522.  
  1523.